<template>
  <div>
    <el-dialog v-model="dialogFormVisible" title="消息信息" width="30%" :before-close="handleClose">
      <el-form ref="condition_params" :model="form" :rules="rules">
        <el-form-item label="问题：" prop="evaluate" :label-width="formLabelWidth">
          {{form.message}}
        </el-form-item>
        <el-form-item label="SQL：" prop="evaluate" :label-width="formLabelWidth">
          <el-input type="textarea" disabled v-model="form.msgBody"></el-input>
        </el-form-item>
        <el-form-item label="SQL：" prop="evaluate" :label-width="formLabelWidth">
          {{form.status == 1 ? "待处理" : form.status == 2 ? "已处理" : "已关闭"}}
        </el-form-item>
        <el-form-item label="审核人：" prop="evaluate" :label-width="formLabelWidth">
          {{form.auditUser}}
        </el-form-item>
        <el-form-item label="审核意见：" prop="evaluate" :label-width="formLabelWidth">
          <el-input type="textarea" disabled v-model="form.auditComment"></el-input>
        </el-form-item>
      </el-form>
      <template #footer>
        <el-button @click="handleClose">取 消</el-button>
        <el-button type="primary" @click="handleClose">关 闭</el-button>
      </template>
    </el-dialog>
  </div>
</template>

<script>
import {ElMessage} from "element-plus";

export default {
  name: "msgDetail",
  setup() {
    //动态加载css
    let cssPath="";
    let mode=localStorage.getItem("mode")
    if(mode=="dark"){
      cssPath = import("/src/assets/css/dark/index.scss");
    }else if(mode=="light"){
      cssPath = import("/src/assets/css/light/index.scss");
    }
    return {
      cssPath
    };
  },
  props: {
    logSessionId:{
      type: String
    }
  },
  data() {
    return {
      dialogFormVisible: false, // 控制弹窗的显示与隐藏
      form: {

      },
      rules: {

      },
      formLabelWidth: '100px'
    }
  },
  mounted() {
  },
  methods: {
    openDialog(row, tb) {
      this.form = {
        message: row.message,
        msgBody: row.msgBody,
        status: row.status,
        auditUser: row.auditUser,
        auditComment: row.auditComment,
        id: row.id
      }
      this.dialogFormVisible = true // 打开弹窗
    },
    handleClose(done) {
      // 在这里可以添加一些关闭弹窗前的逻辑，如果需要的话
      this.dialogFormVisible = false // 关闭
    },
  }
}
</script>

<style scoped>

</style>